de1452e50613ed94421c8a41052751126284a650,camel-core/src/main/java/org/apache/camel/component/bean/MethodInfo.java,MethodInfo,MethodInfo,#CamelContext#Class#Method#List#List#boolean#boolean#,107

Before Change


        }
        
        if (method.getAnnotation(org.apache.camel.RoutingSlip.class) != null
                && matchContext(method.getAnnotation(org.apache.camel.RoutingSlip.class).context())) {
            org.apache.camel.RoutingSlip annotation = method.getAnnotation(org.apache.camel.RoutingSlip.class);
            routingSlip = new RoutingSlip(camelContext);
            routingSlip.setDelimiter(annotation.delimiter());
            routingSlip.setIgnoreInvalidEndpoints(annotation.ignoreInvalidEndpoints());
            // add created routingSlip as a service so we have its lifecycle managed
            try {
                camelContext.addService(routingSlip);
            } catch (Exception e) {
                throw ObjectHelper.wrapRuntimeCamelException(e);
            }
        }

        if (method.getAnnotation(org.apache.camel.DynamicRouter.class) != null
                && matchContext(method.getAnnotation(org.apache.camel.DynamicRouter.class).context())) {
            org.apache.camel.DynamicRouter annotation = method.getAnnotation(org.apache.camel.DynamicRouter.class);
            dynamicRouter = new DynamicRouter(camelContext);
            dynamicRouter.setDelimiter(annotation.delimiter());
            dynamicRouter.setIgnoreInvalidEndpoints(annotation.ignoreInvalidEndpoints());

After Change


        }

        org.apache.camel.DynamicRouter dynamicRouterAnnotation = 
            (org.apache.camel.DynamicRouter)collectedMethodAnnotation.get(org.apache.camel.DynamicRouter.class);
        if (dynamicRouterAnnotation != null
                && matchContext(dynamicRouterAnnotation.context())) {
            dynamicRouter = new DynamicRouter(camelContext);
            dynamicRouter.setDelimiter(dynamicRouterAnnotation.delimiter());
            dynamicRouter.setIgnoreInvalidEndpoints(dynamicRouterAnnotation.ignoreInvalidEndpoints());